<script>
function Search(){
	if(document.keyword.keyword.value=='請輸入關鍵字')
	{
		document.keyword.keyword.value='';
	}
}
</script>
<div class="menu">
<div class="header">
	<div id="navMenu">
    	<ul id="navMainMenu">
	      	<li onClick="window.location.href='./'"><a rel='menu0' href='#' >&nbsp;</a></li>
	      	<li><a rel='menu1' href='#' >&nbsp;</a></li>
	      	<li><a rel='menu2' href='#' >&nbsp;</a></li>
	      	<li><a rel='menu3' href='#' >&nbsp;</a></li>
	      	<li><a rel='menu4' href='#' >&nbsp;</a></li>
	      	<li><a rel='menu5' href='#' >&nbsp;</a></li>
	      	<li><a rel='menu6' href='#' >&nbsp;</a></li>
		</ul>
		<div class="sx">
        <form action="keyword.php" method="get" name='keyword'>
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><input name="keyword" type="text" style="border:0px;" class="kuang03" value="請輸入關鍵字" onmouseover="Search()" /></td>
              <td><input type="image" name="imageField2" src="images/ss.gif" /></td>
            </tr>
          </table>
          </form>
		</div>
    </div>
	
	<div id="navSubMenu" class="navSubMenu cls">
		<ul id="menu0" class="dropMenu">
		<li><marquee style=" width:920px; height:20px; margin:0; padding:0;" scrollamount=1 scrolldelay=1 direction="left"><{$text}></marquee></li></ul>
	    <ul id="menu1" class="dropMenu">
	       <li><a href='searchinfo.php'>租屋搜尋</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='notes.php'>租屋注意事項</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='add_cz.php'>房東刊登物件</a></li>
      </ul>
		 <ul id="menu2" class="dropMenu">
		  <li><a href='rookery.php'>買屋搜尋</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='step.php'>買房五步驟</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='http://www.esunbank.com.tw/b2c/financetrial.aspx?kind=3' target="_blank">房屋貸款</a></li>
	     </ul>
		 
		 <ul id="menu3" class="dropMenu">
	       <li><a href='add_cs.php'>賣屋刊登</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='sellersstep.php'>賣房五步驟</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='http://www.etax.nat.gov.tw/wsite/np?ctnode=10721' target="_blank">稅費專區</a></li>
	     </ul>
		 
		 <ul id="menu4" class="dropMenu">
	       <li><a href='reback.php'>房屋出租回報</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='payback.php'>已繳費回報</a></li>
	     </ul>
		 
		 <ul id="menu5" class="dropMenu">
	       <li><a href='pay.php'>繳費方式</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='charge.php'>收費標準</a></li>
	     </ul>
		 
 		<ul id="menu6" class="dropMenu">
	       <li><a href='about.php'>關於群格</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='manage.php'>經營管理</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='education.php'>教育訓練</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='serve.php'>服務據點</a></li>
		   <li class="wz-3">|</li>
	       <li><a href='personnel.php'>人員招募</a></li>
      </ul>
	</div>
</div>


<script language="javascript" type="text/javascript">
	var current_page_position = 0;//每页默认栏目菜单0-6;
	
	var interval;
	var mousePos = false;
	var mainLI_list = document.getElementById("navMainMenu").getElementsByTagName("li");//主菜单li
	var mainUL_list = document.getElementById("navSubMenu").getElementsByTagName("ul");//子菜单ul
	
	function mouse_In_subNav()
	{
		document.getElementById("navSubMenu").onmouseover = function(){
			mousePos = true;
		}
		document.getElementById("navSubMenu").onmouseout = function(){
			mousePos = false;
		}
		
		return true;
	}
	
	function menuBar()
	{	
		mainLI_list[current_page_position].className = "current cur" + current_page_position;
		mainUL_list[current_page_position].style.display = "block";
		
		//子菜单单独样式
		mainUL_list[1].style.margin = "0 0 0 105px";
		mainUL_list[2].style.margin = "0 0 0 195px";
		mainUL_list[3].style.margin = "0 0 0 305px";
		mainUL_list[4].style.margin = "0 0 0 400px";
		mainUL_list[5].style.margin = "0 0 0 505px";
		mainUL_list[6].style.margin = "0 0 0 515px";
		

		for(var i=0;i<mainLI_list.length;i++)
		{
			mainLI_list[i].accept = i;
			mainLI_list[i].onmouseover=function()
			{
				if(interval)
				{
					interval = window.clearInterval(interval);
				}
				
				for(var j=0;j<mainUL_list.length;j++)
				{
					//主菜单滑动门
					if(this.accept == j)
					{
						var classname = "current"+" cur" + j;
						mainLI_list[j].className = classname;
					}
					else
					{
						mainLI_list[j].className = "";

					}
					
					if(mainLI_list[j].getElementsByTagName("a")[0].rel!="")
					{
						var sub_nav_li_id = mainLI_list[j].getElementsByTagName("a")[0].rel;
						if(this.accept==j)
						{
							document.getElementById(sub_nav_li_id).style.display = "block";
						}
						else
						{
							document.getElementById(sub_nav_li_id).style.display = "";
						}
					}
				}
			}
			
			mainLI_list[i].onmouseout=function()
			{
				if(mouse_In_subNav())
				{
					interval=window.setInterval("menuDelayClose();",500);
					
				}
			}
		}
	}

	function menuDelayClose()
	{
		if(interval)
		{
			interval = window.clearInterval(interval);
		}
		
		if(!mousePos)
		{
			for(var j=0;j<mainUL_list.length;j++)
			{
				mainLI_list[j].className = "";
				mainUL_list[j].style.display = "none";
			}
			mainLI_list[current_page_position].className = "current" + " cur" + current_page_position ;
			mainUL_list[current_page_position].style.display = "block";

		}	
	}
	menuBar()
</script>
</div>